* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li {
    list-style: none;
}

body {
    margin: 0;
}

#head {
    height: 70px;
    width: 100%;
    background-color: pink;
}

#nav {
    position: fixed;
    left: 0px;
    top: 70px;
    height: calc(100% - 70px);
    width: 70px;
    background-color: blue;
}

#left {
    position: absolute;
    left: 70px;
    top: 70px;
    /* 调整top值，避免被导航栏覆盖 */
    height: calc(100% - 70px);
    /* 调整高度，避免与导航栏重叠 */
    width: 200px;
    border-left: 0px;
    border-top: 0px;
    border-bottom: 0px;
    border-right: 2px;
    border-style: groove;
    border-color: darkgray;
}

#left ul {
    margin-left: 10px;
}

#left ul li {
    border-radius: 10px;
}

li:hover {
    background-color: lightgray;
}

#Area {
    margin: 10px;
    position: relative;
    padding-right: 20px;
}

#Area p {
    font-size: 25px;
}

#Area::after {
    content: '\2807';
    /* Unicode字符表示三个点 */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    cursor: pointer;
}

#id {
    margin: 10px;
}

#id p {
    font-size: 15px;
    color: darkgrey;
}

.chat {
    margin: 10px;
}

.chat a {
    color: black;
    text-decoration: none;
}

.menu-popup {
    z-index: 100;
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.menu-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    cursor: pointer;
}

.menu-item.exit {
    color: red;
}

.menu-item button {
    background-color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.menu-item button:hover {
    background-color: lightgray;
}

#main {
    position: absolute;
    left: 300px;
    top: 70px;
    /* 调整top值，避免被导航栏覆盖 */
    height: calc(100% - 70px);
    /* 调整高度，避免与导航栏重叠 */
    width: 800px;
}

/* 聊天相关样式 */
#chat-container {
    width: 100%;
    height: 100%;
    padding: 10px;
    overflow-y: auto;
}

#chat-messages {
    list-style: none;
    padding: 0;
    margin: 0;
}

#chat-messages li {
    padding: 5px;
    border-bottom: 1px solid #ccc;
}

#chat-input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f0f0f0;
    padding: 10px;
    display: flex;
    align-items: center;
}

#chat-input {
    flex: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

#send-button {
    margin-left: 10px;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

/* 成员列表相关样式 */
#right {
    position: absolute;
    right: 10px;
    top: 70px;
    /* 调整top值，避免被导航栏覆盖 */
    height: calc(100% - 70px);
    /* 调整高度，避免与导航栏重叠 */
    width: 300px;
}

#member-list-container {
    width: 300px;
    height: 100%;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 20px;
}

#search-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

#search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    border-color: #007bff;
}

#search-button {
    margin-left: 10px;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-button:hover {
    background-color: #0056b3;
}

#member-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#member-list li {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

#member-list li:last-child {
    border-bottom: none;
}

#member-list li:hover {
    background-color: #f0f0f0;
}

#member-list.status-online {
    color: #28a745;
    font-weight: bold;
}

#member-list.status-offline {
    color: #dc3545;
    font-weight: bold;
}

#member-list img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

#member-list span {
    font-size: 16px;
}

/* 弹窗样式 */
.popup-container {
    z-index: 10;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 300px;
}

.popup h3 {
    margin-top: 0;
}

.popup p {
    margin-bottom: 15px;
}

.popup-buttons {
    display: flex;
    justify-content: flex-end;
}

.popup-buttons button {
    margin-left: 10px;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.popup-buttons #cancelExitBtn {
    color: gray;
}

.popup-buttons #confirmExitBtn {
    color: red;
}

/* 昵称弹窗样式 */
.popup input {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
}

.input-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.link-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

#inviteLink {
    flex: 1;
    padding: 5px;
    margin-right: 10px;
}